package com.googlecode.gwtbb.client.only.widget.form.entry;

import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;
import com.googlecode.gwtbb.client.shared.validation.FieldId;

/**
 * @author Abraham Grief
 * @version $Id$
 * @since Apr 30, 2008
 */
public class LabeledTextBoxFormEntry extends LabeledFormEntry {
	private TextBox entryTextBox;

	public LabeledTextBoxFormEntry(FieldId fieldId, String defaultValue, int row, int col, String labelText, TextBox entryTextBox) {
		super(fieldId, defaultValue, row, col, labelText);
		this.entryTextBox = entryTextBox;
		clearValue();
	}

	public TextBox getEntryTextBox() {
		return entryTextBox;
	}

	public Widget getEntryWidget() {
		return entryTextBox;
	}

	public String getValue() {
		return entryTextBox.getText();
	}

	public void setValue(String value) {
		entryTextBox.setText(value);
	}
}
